Anypoint Monitoring Metrics API
Frequently Asked Questions (FAQs)
Q: How do I find the correct metricName
to use in the FROM Clause?
A: Use the "List Metric Types" endpoint (GET /observability/api/v1/metric_types
) to get a list of available metrics and its short description.
Q: How do I handle pagination?
A: Use the limit
and offset
parameters in search endpoint to configure custom page size. By default, pagination size is 500 records and can be configured upto 2000. Pagination links will be available in metadata
section of the response from Search endpoint.
Q: What is a TIMESERIES
?
A: Time series is a chronological sequence of measurements, with each measurement representing the value of the metric at a specific time window.
Q: How do I query metrics in a TIMESERIES
format?
A: To get metrics data in TIMESERIES
format, add timestamp
in the SELECT
clause, along with TIMESERIES
clause. For example, below query would give average response_time over 5 minute period for a given application
SELECT timestamp, AVG(response_time) from "mulesoft.app.inbound" where timestamp between <t1> and <t2> AND "env.id"='your-env-id' AND "app.id"='your-application-id' TIMESERIES PT5M
Q: What are the supported time duration formats for TIMESERIES
?
A: Duration can be specified in terms of minutes, hours or days. Examples of commonly used durations: PT1M
(minute), PT5M
(5 minutes), PT1H
(hour), PT6H
(6 hours), P1D
(day).
Q: How do I interpret timestamp
field in the response?
A: The timestamp
field in the response represents the beginning of a specific time window, and it is expressed as epoch milliseconds. When dealing with time-series data aggregated into time windows (e.g., 1-minute intervals), the timestamp indicates the starting point of that interval. For example, if you have 1-minute granularity data, a timestamp of 1678886400000 (which corresponds to March 15, 2023, 00:00:00 UTC) represents the data collected within the time window from March 15, 2023, 00:00:00 UTC to March 15, 2023, 00:00:59 UTC.
Q: How do I find values for sub_org.id
and env.id
required in the WHERE
Clause?
A: See How to know my Organization ID on the Anypoint Platform and How to get the Environment ID? for details.
Q: How do I find value for app.id
for my application?
A See How to obtain the Application ID in Runtime Manager for details.
Q: How do I find values for api.instance.id
for my api?
A See Determining API Instance ID on API Manager for details.